package top.jnaw.jee.platform.controller.redirect;

import com.jfinal.core.Controller;
import top.jnaw.jee.platform.Consts;

public class RedirectController extends Controller {

  public void redirect() {
    String header = getHeader("User-Agent");
    if (header.contains("MicroMessenger")) {
      render("/wechat.html");
    } else {
      redirect(Consts.LINK);
    }
  }
}
